package com.czk.queue.dequeue;

import java.util.Deque;
import java.util.LinkedList;

/**
 * 双端队列LinkedList的demo
 *
 * @Author:ChenZhangKun
 * @Date: 2021/9/1 14:19
 */
public class LinkListDemo {
    public static void main(String[] args) {
        Deque<String> deque = new LinkedList<>();
        // 长度
        System.out.println("deque的长度" + deque.size());
        // 头部添加元素
        deque.addFirst("陈");
        deque.addLast("彰");
        System.out.println("首个元素" + deque.peekFirst());
        deque.removeLast();
        System.out.println("首个元素" + deque.peekFirst());
    }
}
